<!doctype html>
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Language" content="zh-cn">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>个人信息_个人中心_华为商城</title>
<link rel="shortcut icon" href="#">
<link href="__PUBLIC__/Css/person/ec.core.css" rel="stylesheet" type="text/css">
<link href="__PUBLIC__/Css/person/main.css" rel="stylesheet" type="text/css">
<js href="__JQUERY__"/>
</head>

<body>
<include file="Public/pinkheader"/>
<include file="Public/searchheader"/>
<!-- 导航 -->
<include file="Public/naver"/>
<div class="hr-10"></div>
<div class="g">
	<!--面包屑 -->
	<div class="breadcrumb-area icon-breadcrumb fcn">您现在的位置：
		<a href="{:U('Index/index')}" title="首页">首页</a>&nbsp;&gt;&nbsp;
		<span id="personCenter"><a href="{:U('Member/index')}" title="个人中心">个人中心</a></span>
		<span id="pathPoint">&nbsp;&gt;&nbsp;</span>
		<b id="pathTitle">个人信息</b>
	</div>
</div>
<div class="hr-15"></div>
<div class="g">
    <div class="fr u-4-5"><!--栏目 -->
		<div class="part-area clearfix">
			<div class="fl">
				<h3 class="userInfo-title"><span>个人信息</span></h3>
			</div>
		</div>
		<div class="hr-20"></div>
		<!--个人信息 -->
		<div class="userInfo-area">
			<form id="personal-save" autocomplete="off" method="post" onsubmit="return return false;">
				<div class="userInfo-form-title">
					<b>基本信息</b>
					<span>（带<em>*</em>为必填项目）</span>
				</div>
				<div class="form-edit-area">
					<div class="form-edit-table">
						<table border="0" cellpadding="0" cellspacing="0" width="90%">
							<tbody>
								<tr>
									<th>用&nbsp;&nbsp;户&nbsp;&nbsp;名：</th>
									<td><span>{$user_info.user_name}</span>
										
									</td>
								</tr>
								<tr>
									<th><span class="required">*</span>真实姓名：</th>
									<td><input maxlength="20" name="true_name" id="true_name" type="text" class="text vam span-200" value="{$user_info.true_name}" ></td>
								</tr>
								<tr>
									<th>邮&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;箱：</th>
									<td><input maxlength="20" name="email" type="text" class="text vam span-200" value="{$user_info.user_email}"  id="user_email"></td>
								</tr>
								
								<tr>
									<th><span class="required">*</span>性&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;别：</th>
									<td>
									   <if condition="$user_info['user_sex'] eq 1">
										<input name="sex" id="man" type="radio" class="radio vam" value="1" checked>
										<label for="man" class="vam">男</label>&nbsp;&nbsp;&nbsp;&nbsp;
										<else/>
										<input name="sex" id="man" type="radio" class="radio vam" value="1">
										<label for="man" class="vam">男</label>&nbsp;&nbsp;&nbsp;&nbsp;
									 </if>
									 <if condition="$user_info['user_sex'] eq 0">
									    <input name="sex" id="woman" type="radio" class="radio vam" value="0" checked>
										<label for="woman" class="vam">女</label>
									 <else/>
									     <input name="sex" id="woman" type="radio" class="radio vam" value="0" checked>
										 <label for="woman" class="vam">女</label>
									 </if>
									</td>
								</tr>
								<tr>
									<th>注册时间：</th>
									<td>{$user_info.user_login_time|date="Y-m-d H:i:s",###}</td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>
				<div style="margin-left:50px;">
					<span class="required">*</span>密保问题：
					
						<select style="height:26px;" name="secure" id="secure_question">
						  <volist name="secure_info" id="vo">
						      <if condition="$vo.secure_id eq $user_info['secure_id']">
							    <option value="{$vo.secure_id}" selected>{$vo.secure_question}</option>
							   <else/>
							    <option value="{$vo.secure_id}">{$vo.secure_question}</option>
							  </if>
							</volist>
						</select><br/><br/>
						<span class="required">*</span>密保答案：<input type="text" id="secure_answer" value="{$user_info['user_answer']}" name="secure_answer" style="width:210px;height:22px;color:">
					
				</div><br/><br/>

				<div class="form-edit-action">
				     
					<input type="button" id="user_info_submit" class="button-action-save vam" value="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					<input class="button-action-cancel-2 vam" value=" " type="reset">
				</div>
				<input type="hidden" id="randomFlag" value="ed8df6720c0590632d7f2ed0425b171a">
			</form>
			<!-- 个人中心会员专享信息 -->
			<p><br></p>	
		</div>
	</div>
<script type="text/javascript">
 $(function(){
     var user_info_submit=$("#user_info_submit");//提交按钮
	
	  //单击按钮进行验证
     user_info_submit.click(function(){
             var submit_status=1;
		     var true_name=$("#true_name").val(); //真实姓名
			 var user_email=$("#user_email").val(); //用户的邮箱
			 var user_sex=$("input[name=sex]").val();//用户性别
			 var secure_question=$("#secure_question").val();//密保问题的按钮
			 var secure_answer=$("#secure_answer").val();//密保答案
             if(true_name.length<1){
			      alert("真实姓名不能为空!");
				  submit_status=0;
				  return ;
			 }
             if(secure_question<0){
			      alert("必须选择密保问题!");
				  submit_status=0;
				  return ; 
			 }
			 
			  if(secure_answer.length<0){
			      alert("密保必须填写!");
				  submit_status=0;
				  return ; 
			 }
			    //进行后台提交修改
			 if(submit_status==1){
			     $.ajax({
				      url:"{:U('PersonCenter/modifierUser')}",
					  type:"POST",
					  data:{
					     'true_name': true_name,
						 'user_email':user_email,
						 'user_sex':user_sex,
						 "secure_question":secure_question,
						 "secure_answer":secure_answer,
					  },
					  success:function(responseText,status,xhr){
					      
					      if(status=='success'){
						       if(responseText==1){
							      alert("修改成功");
							   }else{
							      alert("修改失败");
							   }
						  }else{
						     alert("修改失败!");
						  }
					  
					  },
					  error:function(){
					     alert("修改失败!");
					  },
					  timeout:60*1000,
				 });
			 
			 
			 }
  
     });
  
	  
 
 
 
 
 
 
 
 });



</script>
	<div class="fl u-1-5">
	<!--左边菜单 -->
		<div class="mc-menu-area">
			<div class="h"><a href="#" class="button-go-mc" title="个人中心"><span>个人中心</span></a></div>
			<div class="b">
		  <ul>
        	<li>
        	<h3>订单中心</h3>
            	<ol>
                	<li id="li-order"><a href="{:U('OrderCenter/index')}" title="我的订单"><span>我的订单</span></a></li>
                   
                </ol>
            </li>
            <li>
            <h3>个人中心</h3>
            	<ol>
                	<li id="li-account" class='current'><a href="{:U('PersonCenter/index')}" title="个人信息"><span>个人信息</span></a></li>
                    <li id="li-security"><a href="{:U('PersonCenter/pwd')}" title="密码管理"><span>密码管理</span></a></li>
                    <li id="li-balance" ><a href="{:U('PersonCenter/account')}" title="账户余额"><span>账户余额</span></a></li>
                    <li id="li-myAddress"><a href="{:U('PersonCenter/address')}" title="收货信息"><span>收货信息</span></a></li>
					<li id="li-enterprise" class="hide"></li>
                </ol>
            </li>
            <li>
            <h3>社区中心</h3>
            	<ol>
                	<li id="li-prdRemark"><a href="{:U('Comment/index')}" title="商品评价"><span>商品评价</span></a></li>
                </ol>
            </li>
        </ul>
			</div>
			<div class="f"></div>
			</div>
		</div>
	</div>
	<div class="hr-60"></div>
<!--口号-20121025 -->

<include file="Public/footer"/>
	</body>
</html>